import { Base } from '../../utils/base.js';

class Store extends Base{
  //构造方法-调用调用父级方法-》super()
  constructor() {
    super();
  }
  //获取城市名
  getStoreData(callback){
    var that = this;
    var param={
      url:'store',
      header: {
        'content-type': 'application/json',
        
        },
      sCallback: function (data) {
        callback && callback(data);
      }
      
    };
    this.request(param);
    
  };

    //获取城市名
  getStoreCityId(callback){
    var that = this;
    var param={
      url:'storeCity/id',
      header: {
        'content-type': 'application/json',
       
        },
      sCallback: function (data) {
        callback && callback(data);
        // console.log(data);
      }
      
    };
    this.request(param);
    
  };

    //获取城市名
    getStoreCityName(callback){
      var that = this;
      var param={
        url:'storeCity/name',
        header: {
          'content-type': 'application/json',  
          },
        sCallback: function (data) {
          callback && callback(data);
        }
        
      };
      this.request(param);
      
    };

    //获取门店地址
    getStoreInfo(id,callback){
      var that = this;
      var param={
        url:'storeInfo/'+id,
        header: {
          'content-type': 'application/json',
         
          },
        sCallback: function (data) {
          callback && callback(data);
        }
        
      };
      this.request(param);
      
    };
     //获取门店地址
     getStoreInfos(id,callback){
      var that = this;
      var param={
        url:'storeInfos/'+id,
        header: {
          'content-type': 'application/json',
         
          },
        sCallback: function (data) {
          callback && callback(data);
        }
        
      };
      this.request(param);
      
    };
}

export {Store}